var o = getApp();

Page({
    data: {
        imageurl: "",
        ad: {}
    },
    onLoad: function(t) {
        this.setData({
            imageurl: t.imageurl,
            ad: o.globalData.ad
        });
    },
    save: function() {
        console.log("success:" + this.data.imageurl), wx.saveImageToPhotosAlbum({
            filePath: this.data.imageurl,
            success: function(o) {
                wx.showToast({
                    title: "保存成功"
                });
            },
            fail: function(o) {
                console.log("err:" + o), wx.showToast({
                    title: "保存失败",
                    icon: "none"
                });
            }
        });
    },
    previewImage: function(o) {
        var t = this, n = [];
        n.push(t.data.imageurl), wx.previewImage({
            current: n[0],
            urls: n
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {
        return {
            title: "一键制作图片、文字、GIF表情包",
            path: "pages/emotionEdit/emotionEdit"
        };
    }
});